<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width>, initial-scale=1.0">
    <title>Document</title>
    <style>
        div {
  padding: 20px;
  margin: 30px;
  outline: red solid 2px;
  border: 2px solid green;
  /* 和border呈现的效果相似，但外轮廓线不占网页空间 */
  /* outline:outline-color|outline-style|outline-width|outline-offset|inherit */
}
    </style>
</head>
<body>
   <div></div> 
</body>
</html>